<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org"
      layout:decorator="layout/layout">
<title layout:fragment="title">编辑通知公告</title>
<body>
<div class="main-content" layout:fragment="content">
    <div class="breadcrumbs" id="breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a th:href="@{/content/}" href="/content/">通知公告</a>
            </li>
            <li class="active">编辑</li>
        </ul>
    </div>
    <!-- .page-content -->
    <div class="page-content">
        <form method="post" th:action="@{/content/save}" id="save-form" class="form-horizontal">
            <input type="hidden" id="contentId" name="id" th:value="${content.id}" value=""/>
            <div class="col-sm-12">
                <h4 class="header blue ">基本信息</h4>
            </div>
            <div class="col-sm-12 form-group">
                <label class="col-sm-3 control-label no-padding-right"> 标题<span class="red">*</span> </label>
                <div class="col-sm-9">
                    <input type="text" name="title" id="title" th:value="${content.title}" placeholder="请输入标题" class="col-xs-10 col-sm-5"/>
                    <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right"
                          data-content="发布内容的标题" title="" data-original-title="">?</span>
                </div>
            </div>
            <div class="space-4"></div>
            <div class="col-sm-12 form-group">
                <label class="col-sm-3 control-label no-padding-right"> 类型 </label>
                <div class="col-sm-9">
                    <select id="type" name="type" class="col-xs-10 col-sm-5">
                        <option th:selected="${content.type} == 1" value="1">通知公告</option>
                        <option th:selected="${content.type} == 2" value="2">活动推广</option>
                        <option th:selected="${content.type} == 0" value="0">其他</option>
                    </select>
                </div>
            </div>
            <div class="space-4"></div>
            <div class="col-sm-12 form-group">
                <label class="col-sm-3 control-label no-padding-right"> 署名 </label>
                <div class="col-sm-9">
                    <input type="text" id="userName" name="userName" th:value="${content.userName}" placeholder="请输入署名" class="col-xs-10 col-sm-5"/>
                    <span class="help-button" data-rel="popover" data-trigger="hover" data-placement="right"
                          data-content="内容发布单位署名，一般为组织名称" title="" data-original-title="">?</span>
                </div>
            </div>
            <div class="space-4"></div>
            <div class="col-sm-12">
                <h4 class="header blue ">内容</h4>
            </div>
            <div class="col-sm-12 form-group">
                <div class="col-sm-12">
                    <input type="hidden" name="content" id="content" th:value="${content.content}"/>
                    <script id="editor" type="text/plain" class="col-sm-8 col-sm-offset-2"></script>
                </div>
            </div>
            <div class="space-4"></div>
            <div class="col-sm-12 clearfix form-actions">
                <div class="col-sm-4 col-sm-offset-4">
                    <button class="btn btn-info col-sm-12" type="button" id="submit">
                        <i class="icon-ok bigger-110"></i>
                        保&nbsp;&nbsp;存
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<div layout:fragment="ueitor">
    <script th:src="@{/assets-lib/ueditor/ueditor.config.js}"></script>
    <script th:src="@{/assets-lib/ueditor/ueditor.all.min.js}"></script>
    <script th:src="@{/assets-lib/ueditor/lang/zh-cn/zh-cn.js}"></script>
</div>
<script layout:fragment="script" th:src="@{/assets/js/content/edit.js}"></script>
</body>
</html>